package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.CompanyDetailEntity;
import com.sgb.kjwl.model.entity.business.MemberInfoEntity;
import com.sgb.kjwl.view.event.RoleListEntity;
import com.sgb.kjwl.view.ui.activity.member.AddMemberEntity;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface ContactAPI {

    //企业详情
    @POST("v1/app/userInfo/companyDetail")
    @FormUrlEncoded
    Call<BaseEntity<CompanyDetailEntity>> companyDetail(@Field("companyNo") String companyNo);



    //管理员添加成员
    @POST("v1/app/userInfo/addMember")
    Call<BaseEntity> addMember(@Body AddMemberEntity entity);

    //获取新成员申请个数
    @POST("v1/app/userInfo/memberApplyCount")
    @FormUrlEncoded
    Call<BaseEntity<Integer>> memberApplyCount(@Field("companyNo") String companyNo);

    //审核新员工申请
    @POST("v1/app/userInfo/updateMemberInfo")
    Call<BaseEntity> updateMemberInfo(@Body AddMemberEntity entity);

    //角色下拉
    @POST("v1/app/userInfo/memberInfo")
    @FormUrlEncoded
    Call<BaseEntity<MemberInfoEntity>> memberInfo(@Field("userNo") String userNo);


    //角色下拉
    @POST("v1/app/userInfo/getRoleList")
    @FormUrlEncoded
    Call<BaseEntity<List<RoleListEntity>>> getRoleList(@Field("companyNo") String companyNo);

    //根据手机号查询成员信息
    @POST("v1/app/userInfo/getEmpInfoByPhone")
    @FormUrlEncoded
    Call<BaseEntity> getEmpInfoByPhone(@Field("phone") String phone, @Field("compNo") String compNo);

}
